public class Signallazy {
    public volatile static Signallazy signallazy = new Signallazy();

    public Signallazy getInstance() {
        if (signallazy == null) {  //第一个if用来判断是否需要加锁，
            synchronized (Signallazy.class) {
                if (signallazy == null) {//第二个if用来判断是否需要new对象
                    signallazy = new Signallazy();
                }

            }
        }
        return signallazy;
    }

    private Signallazy()
    {

    }
}
